GPS Odometer
Links
Cruiser Forum Thread:
Github: https://github.com/LennartG-Sve/GPS-Odometer
The GPS Odometer is a plugin for OpenCPN version 5.0 and higher. The keyword for this GPS Odometer is simplicity.
Note that, as this is a GPS based instrument, it requires GPS data to display any data at all. The GPS MNEA 0183 sentences RMC and GGA are mandatory. Se furter information below.
The GPS Odometer contain just these basic functions:
An optional Speedometer with both analog and digital readout.
A Total Distance log, always displayed.
A Trip Distance log, always displayed.
An optional Deparure / Arrival timer with digital readout
A Trip reset button that resets Trip, Departure Time and Arrival Time
An optional Leg Trip time and Distance including a Leg reset button
Instruments
The instruments are shown in the above listed order and it is not possible to change the order. It is however possible to toggle the optional instruments on or off right-clicking on the instrument panel and select 'Settings'.
Total distance, Trip distance plus the Trip reset button can not be toggled off. Just leave the GPS Odometer on screen and reset the trip counter once the trip is ended (and log book written?) or before the next trip starts.
The trip will be considered started as soon as the speed increases above 'Minimum Route Speed', preset to 2 knots (selectable in the settings menu). The departure date and time will be displayed on the instrument as the upper value for 'Departure & Arrival'.
The trip will be considered stopped as soon as the speed decreases below 'Minimum Route Speed' and the date and time will be displayed on the instrument as the lower value for 'Departure & Arrival'.
If the speed then again increases above 'Minimum Route Speed' the trip be either continued or restarted depending on if the 'Trip reset' button has been clicked or not. You may even shut down OpenCPN for e.g. a lunch break, the 'Trip distance' as well as 'Departure & Arrival' times are remembered until the Trip reset button is clicked.
Departure and arrival times are displayed according to the ISO standard 8601 primary alternative ('YYYY-MM-DD HH:MM').
'Total distance' is simply a counter of distance traveled and is not affected by the reset button. Note that you can edit the 'Total distance' value in the OpenCPN configuration file e.g. if the GPS Odometer is replacing another Sumlog instrument. The format is '12345.6' (one decimal only) and remember to do that when OpenCPN is shut down or your change will be lost.
The Leg Trip functionality is a bit different as it has higher time and distance resolution, intended for e.g. tight navigation time and distance measurements. Like “How far is it between X and Y?” or “How long time does it take between Y and Z”. It is always counting (so just click the Leg Reset button to begin a new count session) nor does it use 'Minimum Route Speed' setting.
Several parameters can be adjusted in the 'Settings' menu, just right-click somewhere on the instrument and select to change the settings. Please do not set 'Min Route Speed' to low or you will get false trip start/stop times due to position inaccuracies and/or when anchored.
A few notes about GPS signal information, this is what happens if one or both of the RMC and/or GGA sentences are missing:
There will be no speed or distance count if NMEA 0183 sentence RMC is missing nor will the GPS Odometer start displaying data until NMEA 0183 GGA is indicating a valid GPS signal. There is also a few seconds delay to allow for the position to be properly set. Many GPS units are somewhat inaccurate the first 10 seconds.
The GPS Odometer will continue to register data even if the NMEA 0183 GGA is no longer flagging a correct GPS signal. This is due to the fact that OpenCPN 'm_NMEA0183.Gga.GPSQuality' appears not to detect this state change.
It is essential to use a good quality and stable GPS receiver. Some GPS units are quite unstable when starting (although indicating a valid fix) and, as all distances are added, this will add to the trip and total distances or trigger false departure times.
Bugs and inconveniences
Most of these bugs/inconveniences are inherited from the original dashboard. The instrument window downsizing when e.g. removing the speedometer does not downsize properly. There are also other minor display size inconveniences but these are corrected just grabbing the lower right corner and adjust the panel size. Worst case solution is to restart OpenCPN.
Also, some of the parameters from the Settings menu does not update the instruments until OpenCPN is restarted, like the maximum speed setting in the speedometer.
Installing
The best and most convenient way to install is to use the package manager but if a suitable version is not availanble you may also build the application following the standard method compiling outside the OpenCPN source tree.
Building the application
This has only been tested on Linux and follows the standard procedure for build outside of the OpenCPN source tree. See the OpenCPN developer manual for details regarding other requirements such as git, cmake and wxWidgets as well as download procedures.
Once you have the application downloaded, extract and copy it to /usr/local/src/odometer, then use (with proper user rights):
cd /usr/local/src/odometer
mkdir build
cd build
cmake ..
cmake --build . --config release
To install as a user application directly usable by OpenCPN now use:
make install
To generate install packages you may use:
cpack
The install packages will be generated in
/usr/local/src/odometer/build/
I did this plugin as I wanted a simple GPS based Odometer. The Logbook has the option but you may not need all the other stuff in there and also wants an on-screen solution.
For 'dry-runs' I recommend either trips recorded using OpenCPN VDR plugin or gpsfeed+ in a square pattern (getting various speeds).
Contact: You can PM me through OpenCPN in Cruisers Forum, look for LennartG or use Search → Advanced search → Search by user name.